package com.mindao.app.weixin.model;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.JoinColumn;
import javax.persistence.Lob;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.mindao.app.common.spring.model.BaseModel;

/**
/* 版权所有： 广州敏道科技有限公司
/*
/* 功能描述：微信图文消息
/*
/* 创 建 人：李国才
/* 创建时间：2016年7月17日 下午8:08:08 	
 **/
@Entity
@Table(name = "weixin_mp_newsitem")
public class WbmpNewsItem  extends BaseModel{
//	 "title": TITLE,
//     "thumb_media_id": THUMB_MEDIA_ID,
//     "show_cover_pic": SHOW_COVER_PIC(0 / 1),
//     "author": AUTHOR,
//     "digest": DIGEST,
//     "content": CONTENT,
//     "url": URL,
//     "content_source_url": CONTETN_SOURCE_URL
	private String title;
	private Integer show_cover_pic;
	private String author;
	private String digest;
	private String content;
	private String url;
	private String content_source_url;
	
	private WxmpMaterial wxmpMaterial;
	public String getTitle() {
		return title;
	}
	public void setTitle(String title) {
		this.title = title;
	}
	public Integer getShow_cover_pic() {
		return show_cover_pic;
	}
	public void setShow_cover_pic(Integer show_cover_pic) {
		this.show_cover_pic = show_cover_pic;
	}
	public String getAuthor() {
		return author;
	}
	public void setAuthor(String author) {
		this.author = author;
	}
	public String getDigest() {
		return digest;
	}
	public void setDigest(String digest) {
		this.digest = digest;
	}
	 @Lob
	 @Basic(fetch = FetchType.EAGER)
	 @Column(name="content2",  nullable=true) 
	public String getContent() {
		return content;
	}
	
	public void setContent(String content) {
		this.content = content;
	}
	public String getUrl() {
		return url;
	}
	public void setUrl(String url) {
		this.url = url;
	}
	public String getContent_source_url() {
		return content_source_url;
	}
	public void setContent_source_url(String content_source_url) {
		this.content_source_url = content_source_url;
	}
	@ManyToOne 
	@JoinColumn(name = "material_id", nullable = true)
	public WxmpMaterial getWxmpMaterial() {
		return wxmpMaterial;
	}
	public void setWxmpMaterial(WxmpMaterial wxmpMaterial) {
		this.wxmpMaterial = wxmpMaterial;
	}
	public WbmpNewsItem(String title, Integer show_cover_pic, String author,
			String digest, String content, String url,
			String content_source_url, WxmpMaterial wxmpMaterial) {
		super();
		this.title = title;
		this.show_cover_pic = show_cover_pic;
		this.author = author;
		this.digest = digest;
		this.content = content;
		this.url = url;
		this.content_source_url = content_source_url;
		this.wxmpMaterial = wxmpMaterial;
	}
	
	
}
